import {makeAutoObservable, runInAction} from "mobx"
import { http } from '@/utils'

/**
 * 用户模块store
 * 请求路由封装类
 */
class ChannelsStore {
  channelsList= []
  constructor() {
    makeAutoObservable(this)
  }
  async getChannelsList() {
    const res = await http.get('/channels')
    runInAction(() => {
      this.channelsList = res.data.channels
    })
  }
}

export default ChannelsStore